Micron Document
<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>JavaBeans</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/JavaBeans"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/ext.pygments.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-JavaBeans rootpage-JavaBeans skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">JavaBeans</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr">
<style data-mw-deduplicate="TemplateStyles:r1236090951">
/* start https://en.wikipedia.org/ */


.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}


/* end https://en.wikipedia.org/ */
</style><div role="note" class="hatnote navigation-not-searchable">Not to be confused with <a href="Enterprise_JavaBeans" class="mw-redirect" title="Enterprise JavaBeans">Enterprise JavaBeans</a>.</div>
<style data-mw-deduplicate="TemplateStyles:r1251242444">
/* start https://en.wikipedia.org/ */


.mw-parser-output .ambox{border:1px solid #a2a9b1;border-left:10px solid #36c;background-color:#fbfbfb;box-sizing:border-box}.mw-parser-output .ambox+link+.ambox,.mw-parser-output .ambox+link+style+.ambox,.mw-parser-output .ambox+link+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+style+.ambox,.mw-parser-output .ambox+.mw-empty-elt+link+link+.ambox{margin-top:-1px}html body.mediawiki .mw-parser-output .ambox.mbox-small-left{margin:4px 1em 4px 0;overflow:hidden;width:238px;border-collapse:collapse;font-size:88%;line-height:1.25em}.mw-parser-output .ambox-speedy{border-left:10px solid #b32424;background-color:#fee7e6}.mw-parser-output .ambox-delete{border-left:10px solid #b32424}.mw-parser-output .ambox-content{border-left:10px solid #f28500}.mw-parser-output .ambox-style{border-left:10px solid #fc3}.mw-parser-output .ambox-move{border-left:10px solid #9932cc}.mw-parser-output .ambox-protection{border-left:10px solid #a2a9b1}.mw-parser-output .ambox .mbox-text{border:none;padding:0.25em 0.5em;width:100%}.mw-parser-output .ambox .mbox-image{border:none;padding:2px 0 2px 0.5em;text-align:center}.mw-parser-output .ambox .mbox-imageright{border:none;padding:2px 0.5em 2px 0;text-align:center}.mw-parser-output .ambox .mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ambox .mbox-image-div{width:52px}@media(min-width:720px){.mw-parser-output .ambox{margin:0 10%}}@media print{body.ns-0 .mw-parser-output .ambox{display:none!important}}


/* end https://en.wikipedia.org/ */
</style><style data-mw-deduplicate="TemplateStyles:r1248332772">
/* start https://en.wikipedia.org/ */


.mw-parser-output .multiple-issues-text{width:95%;margin:0.2em 0}.mw-parser-output .multiple-issues-text>.mw-collapsible-content{margin-top:0.3em}.mw-parser-output .compact-ambox .ambox{border:none;border-collapse:collapse;background-color:transparent;margin:0 0 0 1.6em!important;padding:0!important;width:auto;display:block}body.mediawiki .mw-parser-output .compact-ambox .ambox.mbox-small-left{font-size:100%;width:auto;margin:0}.mw-parser-output .compact-ambox .ambox .mbox-text{padding:0!important;margin:0!important}.mw-parser-output .compact-ambox .ambox .mbox-text-span{display:list-item;line-height:1.5em;list-style-type:disc}body.skin-minerva .mw-parser-output .multiple-issues-text>.mw-collapsible-toggle,.mw-parser-output .compact-ambox .ambox .mbox-image,.mw-parser-output .compact-ambox .ambox .mbox-imageright,.mw-parser-output .compact-ambox .ambox .mbox-empty-cell,.mw-parser-output .compact-ambox .hide-when-compact{display:none}


/* end https://en.wikipedia.org/ */
</style>
<p>In computing based on the <a href="Java_(programming_language)" title="Java (programming language)">Java</a> Platform, <b>JavaBeans</b> is a technology developed by <a href="Sun_Microsystems" title="Sun Microsystems">Sun Microsystems</a> and released in 1996, as part of <a href="Java_Development_Kit" title="Java Development Kit">JDK</a> 1.1.
</p><p>The 'beans' of JavaBeans are classes that encapsulate one or more <a href="Object_(computer_science)" title="Object (computer science)">objects</a> into a single standardized object (the bean). This standardization allows the beans to be handled in a more generic fashion, allowing easier <a href="Code_reuse" title="Code reuse">code reuse</a> and <a href="Type_introspection" title="Type introspection">introspection</a>. This in turn allows the beans to be treated as <a href="Component-based_software_engineering" title="Component-based software engineering">software components</a>, and to be manipulated visually by <a href="Integrated_development_environment" title="Integrated development environment">editors and IDEs</a> without needing any initial configuration, or to know any internal implementation details.
</p><p>As part of the standardization, all beans must be <a href="Serialization" title="Serialization">serializable</a>, have a <a href="Nullary_constructor" title="Nullary constructor">zero-argument constructor</a>, and allow access to properties using <a href="Mutator_method" title="Mutator method">getter and setter methods</a>.
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="Features">Features</h2></div>
<dl><dt>Introspection</dt>
<dd>Introspection is a process of analyzing a Bean to determine its capabilities. This is an essential feature of the Java Beans specification because it allows another application, such as a design tool, to obtain information about a component.</dd>
<dt>Properties</dt>
<dd>A property is a subset of a Bean's state. The values assigned to the properties determine the behaviour and appearance of that component. They are set through a setter method and can be obtained by a getter method.</dd>
<dt>Customization</dt>
<dd>A customizer can provide a step-by-step guide that the process must follow to use the component in a specific context.</dd>
<dt>Events</dt>
<dd>Beans may interact with the EventObject EventListener model.</dd>
<dt>Persistence</dt>
<dd>Persistence is the ability to save the current state of a Bean, including the values of a Bean's properties and instance variables, to nonvolatile storage and to retrieve them at a later time.</dd>
<dt>Methods</dt>
<dd>A Bean should use <a href="Mutator_method#Java_example" title="Mutator method">accessor methods</a> to <a href="Encapsulation_(computer_programming)" title="Encapsulation (computer programming)">encapsulate</a> the properties. A Bean can provide other methods for business logic not related to the access to the properties.</dd></dl>
<div class="mw-heading mw-heading2"><h2 id="Advantages">Advantages</h2></div>
<ul><li>The properties, events, and methods of a bean can be exposed to another application.</li>
<li>A bean may register to receive events from other objects and can generate events that are sent to those other objects. </li>
<li>Auxiliary software can be provided to help configure a bean. </li>
<li>The configuration settings of a bean can be saved to persistent storage and restored. </li></ul>
<div class="mw-heading mw-heading2"><h2 id="Disadvantages">Disadvantages</h2></div>
<ul><li>A class with a <a href="Nullary_constructor" title="Nullary constructor">zero-argument constructor</a> is subject to being instantiated in an invalid state.<sup id="cite_ref-Bloch_1-0" class="reference"><a href="#cite_note-Bloch-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup> If such a class is instantiated manually by a developer (rather than automatically by some kind of framework), the developer might not realize that the class has been improperly instantiated. The compiler cannot detect such a problem, and even if it is documented, there is no guarantee that the developer will see the documentation.</li>
<li>JavaBeans are inherently mutable and so lack the advantages offered by <a href="Immutable_objects" class="mw-redirect" title="Immutable objects">immutable objects</a>.<sup id="cite_ref-Bloch_1-1" class="reference"><a href="#cite_note-Bloch-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup></li>
<li>Having to create getters for every property and setters for many, most, or all of them can lead to an immense quantity of <a href="Boilerplate_code" title="Boilerplate code">boilerplate code</a>.</li></ul>
<div class="mw-heading mw-heading2"><h2 id="JavaBeans_API">JavaBeans API</h2></div>
<p>The JavaBeans functionality is provided by a set of classes and interfaces in the <code>java.beans</code> package.
</p>
<table class="wikitable sortable">

<tbody><tr>
<th>Interface</th>
<th>Description
</th></tr>
<tr>
<td>AppletInitializer</td>
<td>Methods in this interface are used to initialize Beans that are also <a href="Java_applet" title="Java applet">applets</a>.
</td></tr>
<tr>
<td>BeanInfo</td>
<td>This interface allows the designer to specify information about the events, methods and properties of a Bean.
</td></tr>
<tr>
<td>Customizer</td>
<td>This interface allows the designer to provide a graphical user interface through which a bean may be configured.
</td></tr>
<tr>
<td>DesignMode</td>
<td>Methods in this interface determine if a bean is executing in design mode.
</td></tr>
<tr>
<td>ExceptionListener</td>
<td>A method in this interface is invoked when an exception has occurred.
</td></tr>
<tr>
<td>PropertyChangeListener</td>
<td>A method in this interface is invoked when a bound property is changed.
</td></tr>
<tr>
<td>PropertyEditor</td>
<td>Objects that implement this interface allow the designer to change and display property values.
</td></tr>
<tr>
<td>VetoableChangeListener</td>
<td>A method in this interface is invoked when a Constrained property is changed.
</td></tr>
<tr>
<td>Visibility</td>
<td>Methods in this interface allow a bean to execute in environments where the GUI is not available.
</td></tr></tbody></table>
<div class="mw-heading mw-heading2"><h2 id="JavaBean_conventions">JavaBean conventions</h2></div>
<p>In order to function as a JavaBean <a href="Class_(computer_science)" class="mw-redirect" title="Class (computer science)">class</a>, an object class must obey certain conventions about method naming, construction, and behaviour. These conventions make it possible to have tools that can use, reuse, replace, and connect Java Beans.
</p><p>The required conventions are as follows:
</p>
<ul><li>The class must have a public <a href="Default_constructor" title="Default constructor">default constructor</a> (with no arguments). This allows easy instantiation within editing and activation frameworks.</li>
<li>The class <a href="Property_(programming)" title="Property (programming)">properties</a> must be accessible using <i>get</i>, <i>set</i>, <i>is</i> (can be used for boolean properties instead of get), <i>to</i> and other methods (so-called <a href="Accessor" class="mw-redirect" title="Accessor">accessor methods</a> and <a href="Mutator_method" title="Mutator method">mutator methods</a>) according to a standard <a href="Naming_conventions_(programming)" class="mw-redirect" title="Naming conventions (programming)">naming convention</a>. This allows easy automated inspection and updating of bean state within frameworks, many of which include custom editors for various types of properties. Setters can have one or more arguments.</li>
<li>The class should be <a href="Serialization#Programming_language_support" title="Serialization">serializable</a>. (This allows applications and frameworks to reliably save, store, and restore the bean's state in a manner independent of the <a href="Virtual_machine" title="Virtual machine">VM</a> and of the platform.)</li></ul>
<div class="mw-heading mw-heading3"><h3 id="Code_example">Code example</h3></div>
<div class="mw-highlight mw-highlight-lang-java mw-content-ltr" dir="ltr"><pre><span class="kn">package</span><span class="w"> </span><span class="nn">player</span><span class="p">;</span>

<span class="kd">public</span><span class="w"> </span><span class="kd">class</span> <span class="nc">PersonBean</span><span class="w"> </span><span class="kd">implements</span><span class="w"> </span><span class="n">java</span><span class="p">.</span><span class="na">io</span><span class="p">.</span><span class="na">Serializable</span><span class="w"> </span><span class="p">{</span>

<span class="w"> </span><span class="cm">/** Properties **/</span>
<span class="w"> </span><span class="kd">private</span><span class="w"> </span><span class="kt">boolean</span><span class="w"> </span><span class="n">deceased</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">false</span><span class="p">;</span>

<span class="w"> </span><span class="kd">private</span><span class="w"> </span><span class="n">List</span><span class="w"> </span><span class="n">list</span><span class="p">;</span>

<span class="w"> </span><span class="cm">/** Property "name", readable/writable. */</span>
<span class="w"> </span><span class="kd">private</span><span class="w"> </span><span class="n">String</span><span class="w"> </span><span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">null</span><span class="p">;</span>

<span class="w"> </span><span class="cm">/** No-arg constructor (takes no arguments). */</span>
<span class="w"> </span><span class="kd">public</span><span class="w"> </span><span class="nf">PersonBean</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="p">}</span>

<span class="w"> </span><span class="kd">public</span><span class="w"> </span><span class="n">List</span><span class="w"> </span><span class="nf">getList</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">list</span><span class="p">;</span>
<span class="w"> </span><span class="p">}</span>
<span class="w"> </span>
<span class="w"> </span><span class="kd">public</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">setList</span><span class="p">(</span><span class="kd">final</span><span class="w"> </span><span class="n">List</span><span class="w"> </span><span class="n">list</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="k">this</span><span class="p">.</span><span class="na">list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">list</span><span class="p">;</span>
<span class="w"> </span><span class="p">}</span>

<span class="w"> </span><span class="cm">/**</span>
<span class="cm"> * Getter for property "name".</span>
<span class="cm"> */</span>
<span class="w"> </span><span class="kd">public</span><span class="w"> </span><span class="n">String</span><span class="w"> </span><span class="nf">getName</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">name</span><span class="p">;</span>
<span class="w"> </span><span class="p">}</span>

<span class="w"> </span><span class="cm">/**</span>
<span class="cm"> * Setter for property "name".</span>
<span class="cm"> *</span>
<span class="cm"> * @param value</span>
<span class="cm"> */</span>
<span class="w"> </span><span class="kd">public</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">setName</span><span class="p">(</span><span class="kd">final</span><span class="w"> </span><span class="n">String</span><span class="w"> </span><span class="n">value</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="k">this</span><span class="p">.</span><span class="na">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">value</span><span class="p">;</span>
<span class="w"> </span><span class="p">}</span>

<span class="w"> </span><span class="cm">/**</span>
<span class="cm"> * Getter for property "deceased"</span>
<span class="cm"> * Different syntax for a boolean field (is vs get)</span>
<span class="cm"> */</span>
<span class="w"> </span><span class="kd">public</span><span class="w"> </span><span class="kt">boolean</span><span class="w"> </span><span class="nf">isDeceased</span><span class="p">()</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="k">return</span><span class="w"> </span><span class="n">deceased</span><span class="p">;</span>
<span class="w"> </span><span class="p">}</span>

<span class="w"> </span><span class="cm">/**</span>
<span class="cm"> * Setter for property "deceased".</span>
<span class="cm"> * @param value</span>
<span class="cm"> */</span>
<span class="w"> </span><span class="kd">public</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">setDeceased</span><span class="p">(</span><span class="kt">boolean</span><span class="w"> </span><span class="n">value</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="n">deceased</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">value</span><span class="p">;</span>
<span class="w"> </span><span class="p">}</span>
<span class="p">}</span>
</pre></div>
<p><b><u><code>TestPersonBean.java</code></u></b>:
</p>
<div class="mw-highlight mw-highlight-lang-java mw-content-ltr" dir="ltr"><pre><span class="kn">import</span><span class="w"> </span><span class="nn">player.PersonBean</span><span class="p">;</span>

<span class="cm">/**</span>
<span class="cm"> * Class "TestPersonBean".</span>
<span class="cm"> */</span>
<span class="kd">public</span><span class="w"> </span><span class="kd">class</span> <span class="nc">TestPersonBean</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="cm">/**</span>
<span class="cm"> * Tester method "main" for class "PersonBean".</span>
<span class="cm"> *</span>
<span class="cm"> * @param arguments</span>
<span class="cm"> */</span>
<span class="w"> </span><span class="kd">public</span><span class="w"> </span><span class="kd">static</span><span class="w"> </span><span class="kt">void</span><span class="w"> </span><span class="nf">main</span><span class="p">(</span><span class="kd">final</span><span class="w"> </span><span class="n">String</span><span class="o">[]</span><span class="w"> </span><span class="n">arguments</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<span class="w"> </span><span class="kd">final</span><span class="w"> </span><span class="n">PersonBean</span><span class="w"> </span><span class="n">person</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="k">new</span><span class="w"> </span><span class="n">PersonBean</span><span class="p">();</span>

<span class="w"> </span><span class="n">person</span><span class="p">.</span><span class="na">setName</span><span class="p">(</span><span class="s">"Bob"</span><span class="p">);</span>
<span class="w"> </span><span class="n">person</span><span class="p">.</span><span class="na">setDeceased</span><span class="p">(</span><span class="kc">false</span><span class="p">);</span>
<span class="w"> </span><span class="n">person</span><span class="p">.</span><span class="na">setList</span><span class="p">(</span><span class="k">new</span><span class="w"> </span><span class="n">ArrayList</span><span class="p">());</span>

<span class="w"> </span><span class="c1">// Output: "Bob [alive]"</span>
<span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">print</span><span class="p">(</span><span class="n">person</span><span class="p">.</span><span class="na">getName</span><span class="p">());</span>
<span class="w"> </span><span class="n">System</span><span class="p">.</span><span class="na">out</span><span class="p">.</span><span class="na">println</span><span class="p">(</span><span class="n">person</span><span class="p">.</span><span class="na">isDeceased</span><span class="p">()</span><span class="w"> </span><span class="o">?</span><span class="w"> </span><span class="s">" [deceased]"</span><span class="w"> </span><span class="p">:</span><span class="w"> </span><span class="s">" [alive]"</span><span class="p">);</span>
<span class="w"> </span><span class="p">}</span>
<span class="p">}</span>
</pre></div>
<div class="mw-highlight mw-highlight-lang-xml mw-content-ltr" dir="ltr"><pre><span class="nt">&lt;jsp:useBean</span><span class="w"> </span><span class="na">id=</span><span class="s">"person"</span><span class="w"> </span><span class="na">class=</span><span class="s">"player.PersonBean"</span><span class="w"> </span><span class="na">scope=</span><span class="s">"page"</span><span class="nt">/&gt;</span>
<span class="nt">&lt;jsp:setProperty</span><span class="w"> </span><span class="na">name=</span><span class="s">"person"</span><span class="w"> </span><span class="na">property=</span><span class="s">"*"</span><span class="nt">/&gt;</span>

<span class="nt">&lt;html&gt;</span>
<span class="w"> </span><span class="nt">&lt;body&gt;</span>
<span class="w"> </span>Name:<span class="w"> </span><span class="nt">&lt;jsp:getProperty</span><span class="w"> </span><span class="na">name=</span><span class="s">"person"</span><span class="w"> </span><span class="na">property=</span><span class="s">"name"</span><span class="nt">/&gt;&lt;br/&gt;</span>
<span class="w"> </span>Deceased?<span class="w"> </span><span class="nt">&lt;jsp:getProperty</span><span class="w"> </span><span class="na">name=</span><span class="s">"person"</span><span class="w"> </span><span class="na">property=</span><span class="s">"deceased"</span><span class="nt">/&gt;&lt;br/&gt;</span>
<span class="w"> </span><span class="nt">&lt;br/&gt;</span>
<span class="w"> </span><span class="nt">&lt;form</span><span class="w"> </span><span class="na">name=</span><span class="s">"beanTest"</span><span class="w"> </span><span class="na">method=</span><span class="s">"POST"</span><span class="w"> </span><span class="na">action=</span><span class="s">"testPersonBean.jsp"</span><span class="nt">&gt;</span>
<span class="w"> </span>Enter<span class="w"> </span>a<span class="w"> </span>name:<span class="w"> </span><span class="nt">&lt;input</span><span class="w"> </span><span class="na">type=</span><span class="s">"text"</span><span class="w"> </span><span class="na">name=</span><span class="s">"name"</span><span class="w"> </span><span class="na">size=</span><span class="s">"50"</span><span class="nt">&gt;&lt;br/&gt;</span>
<span class="w"> </span>Choose<span class="w"> </span>an<span class="w"> </span>option:
<span class="w"> </span><span class="nt">&lt;select</span><span class="w"> </span><span class="na">name=</span><span class="s">"deceased"</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;option</span><span class="w"> </span><span class="na">value=</span><span class="s">"false"</span><span class="nt">&gt;</span>Alive<span class="nt">&lt;/option&gt;</span>
<span class="w"> </span><span class="nt">&lt;option</span><span class="w"> </span><span class="na">value=</span><span class="s">"true"</span><span class="nt">&gt;</span>Dead<span class="nt">&lt;/option&gt;</span>
<span class="w"> </span><span class="nt">&lt;/select&gt;</span>
<span class="w"> </span><span class="nt">&lt;input</span><span class="w"> </span><span class="na">type=</span><span class="s">"submit"</span><span class="w"> </span><span class="na">value=</span><span class="s">"Test the Bean"</span><span class="nt">&gt;</span>
<span class="w"> </span><span class="nt">&lt;/form&gt;</span>
<span class="w"> </span><span class="nt">&lt;/body&gt;</span>
<span class="nt">&lt;/html&gt;</span>
</pre></div>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<ul><li><a href="Software_package_(disambiguation)" class="mw-redirect mw-disambig" title="Software package (disambiguation)">Software packaging</a></li></ul>
<div class="mw-heading mw-heading2"><h2 id="References">References</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */


.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}


/* end https://en.wikipedia.org/ */
</style><div class="reflist reflist-columns references-column-width reflist-columns-2">
<ol class="references">
<li id="cite_note-Bloch-1"><span class="mw-cite-backlink">^ <a href="#cite_ref-Bloch_1-0"><sup><i><b>a</b></i></sup></a> <a href="#cite_ref-Bloch_1-1"><sup><i><b>b</b></i></sup></a></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */


.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}


/* end https://en.wikipedia.org/ */
</style><cite id="CITEREFBloch2008" class="citation book cs1"><a href="Joshua_Bloch" title="Joshua Bloch">Bloch, Joshua</a> (2008). <span class="id-lock-registration" title="Free registration required"><a rel="nofollow" class="external text" href="https://archive.org/details/effectivejava00bloc_0/page/13"><i>Effective Java</i></a></span> (Second&nbsp;ed.). Addison-Wesley. p.&nbsp;<a rel="nofollow" class="external text" href="https://archive.org/details/effectivejava00bloc_0/page/13">13</a>. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>978-0-321-35668-0</bdi>.</cite></span>
</li>
</ol></div>
<div class="mw-heading mw-heading2"><h2 id="External_links">External links</h2></div>
<ul><li><a rel="nofollow" class="external text" href="http://download.oracle.com/javase/tutorial/javabeans/">Oracle's JavaBeans tutorials</a></li>
<li><a rel="nofollow" class="external text" href="http://www.oracle.com/technetwork/java/javase/documentation/spec-136004.html">JavaBeans specification</a></li></ul></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-01-03" href="https://en.wikipedia.org/wiki/?title=JavaBeans&amp;oldid=1267043340">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>

</body></html>